{"ast":null,"code":"import _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport * as React from 'react';\nimport { unstable_useControlled as useControlled, unstable_useId as useId } from '@mui/utils';\nvar useTabs = function useTabs(parameters) {\n  var valueProp = parameters.value,\n    defaultValue = parameters.defaultValue,\n    onChange = parameters.onChange,\n    orientation = parameters.orientation,\n    direction = parameters.direction,\n    selectionFollowsFocus = parameters.selectionFollowsFocus;\n  var _useControlled = useControlled({\n      controlled: valueProp,\n      default: defaultValue,\n      name: 'Tabs',\n      state: 'value'\n    }),\n    _useControlled2 = _slicedToArray(_useControlled, 2),\n    value = _useControlled2[0],\n    setValue = _useControlled2[1];\n  var idPrefix = useId();\n  var onSelected = React.useCallback(function (e, newValue) {\n    setValue(newValue);\n    if (onChange) {\n      onChange(e, newValue);\n    }\n  }, [onChange, setValue]);\n  var tabsContextValue = React.useMemo(function () {\n    return {\n      idPrefix: idPrefix,\n      value: value,\n      onSelected: onSelected,\n      orientation: orientation,\n      direction: direction,\n      selectionFollowsFocus: selectionFollowsFocus\n    };\n  }, [idPrefix, value, onSelected, orientation, direction, selectionFollowsFocus]);\n  return {\n    tabsContextValue: tabsContextValue\n  };\n};\nexport default useTabs;","map":{"version":3,"names":["React","unstable_useControlled","useControlled","unstable_useId","useId","useTabs","parameters","valueProp","value","defaultValue","onChange","orientation","direction","selectionFollowsFocus","controlled","default","name","state","setValue","idPrefix","onSelected","useCallback","e","newValue","tabsContextValue","useMemo"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@mui/base/TabsUnstyled/useTabs.js"],"sourcesContent":["import * as React from 'react';\nimport { unstable_useControlled as useControlled, unstable_useId as useId } from '@mui/utils';\nconst useTabs = parameters => {\n  const {\n    value: valueProp,\n    defaultValue,\n    onChange,\n    orientation,\n    direction,\n    selectionFollowsFocus\n  } = parameters;\n  const [value, setValue] = useControlled({\n    controlled: valueProp,\n    default: defaultValue,\n    name: 'Tabs',\n    state: 'value'\n  });\n  const idPrefix = useId();\n  const onSelected = React.useCallback((e, newValue) => {\n    setValue(newValue);\n    if (onChange) {\n      onChange(e, newValue);\n    }\n  }, [onChange, setValue]);\n  const tabsContextValue = React.useMemo(() => {\n    return {\n      idPrefix,\n      value,\n      onSelected,\n      orientation,\n      direction,\n      selectionFollowsFocus\n    };\n  }, [idPrefix, value, onSelected, orientation, direction, selectionFollowsFocus]);\n  return {\n    tabsContextValue\n  };\n};\nexport default useTabs;"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,sBAAsB,IAAIC,aAAa,EAAEC,cAAc,IAAIC,KAAK,QAAQ,YAAY;AAC7F,IAAMC,OAAO,GAAG,SAAVA,OAAO,CAAGC,UAAU,EAAI;EAC5B,IACSC,SAAS,GAMdD,UAAU,CANZE,KAAK;IACLC,YAAY,GAKVH,UAAU,CALZG,YAAY;IACZC,QAAQ,GAINJ,UAAU,CAJZI,QAAQ;IACRC,WAAW,GAGTL,UAAU,CAHZK,WAAW;IACXC,SAAS,GAEPN,UAAU,CAFZM,SAAS;IACTC,qBAAqB,GACnBP,UAAU,CADZO,qBAAqB;EAEvB,qBAA0BX,aAAa,CAAC;MACtCY,UAAU,EAAEP,SAAS;MACrBQ,OAAO,EAAEN,YAAY;MACrBO,IAAI,EAAE,MAAM;MACZC,KAAK,EAAE;IACT,CAAC,CAAC;IAAA;IALKT,KAAK;IAAEU,QAAQ;EAMtB,IAAMC,QAAQ,GAAGf,KAAK,EAAE;EACxB,IAAMgB,UAAU,GAAGpB,KAAK,CAACqB,WAAW,CAAC,UAACC,CAAC,EAAEC,QAAQ,EAAK;IACpDL,QAAQ,CAACK,QAAQ,CAAC;IAClB,IAAIb,QAAQ,EAAE;MACZA,QAAQ,CAACY,CAAC,EAAEC,QAAQ,CAAC;IACvB;EACF,CAAC,EAAE,CAACb,QAAQ,EAAEQ,QAAQ,CAAC,CAAC;EACxB,IAAMM,gBAAgB,G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